/*
 * FormaHoyos.h
 *
 *  Created on: 23/10/2013
 *      Author: ezequiel
 */

#ifndef FORMAHOYOS_H_
#define FORMAHOYOS_H_
#include <vector>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform2.hpp>
#include <glm/gtx/projection.hpp>
#include <iostream>
#include <fstream>
#include "../Camara.h"
#include "../Dibujable.h"
#include <vector>
#include "../CurvaBessier.h"
#include "../CurvaSpline.h"
class FormaHoyos : public Dibujable {
public:
	FormaHoyos();
	virtual ~FormaHoyos();
		void crearForma();
			void render(GLuint handle, glm::mat4* matModelo);
			void render(GLuint);
private:
			GLfloat* hoyo_vertex_buffer;
			GLfloat* hoyo_normal_buffer;
			GLuint* hoyo_index_buffer;
			GLfloat* hoyo_texture_buffer ;
			unsigned int hoyo_vertex_buffer_size;
			unsigned int hoyo_normal_buffer_size;
			unsigned int hoyo_index_buffer_size;
			void indexar();
			void indexarPuntos();
			void calcularNormales();
			glm::vec3 calcularNormal(glm::vec3 vec1, glm::vec3 vec2);
			float tiempo;
};

#endif /* FORMAHOYOS_H_ */
